package com.aw.guiguzi.bean

import java.io.Serializable

class NumEncloseBean(var resultNumber: Int) : Serializable {
    var silverCount = 0
    var skinCount = 0
    var gemstoneCount = 0
    var isChecked = false

    fun getSilverCount(is2: Boolean): Int {
        return if (is2) {
            if (silverCount <= 10) {
                2 * silverCount
            } else {
                silverCount
            }
        } else {
            if (silverCount * 2 <= 10) {
                2 * silverCount
            } else {
                silverCount
            }
        }
    }

    fun getSkinCount(is2: Boolean): Int {
        return if (is2) {
            if (skinCount <= 10) {
                2 * skinCount
            } else {
                skinCount
            }
        } else {
            if (skinCount * 2 <= 10) {
                2 * skinCount
            } else {
                skinCount
            }
        }
    }

    fun getGemstoneCount(is2: Boolean): Int {
        return if (is2) {
            if (gemstoneCount <= 10) {
                2 * gemstoneCount
            } else {
                gemstoneCount
            }
        } else {
            if (gemstoneCount * 2 <= 10) {
                2 * gemstoneCount
            } else {
                gemstoneCount
            }
        }
    }
}